# CHECKLIST #
# optimization flags are on
# avg is in all directories
# thru is a sufficient value
#

echo "Did you remember to update svn?"
echo "Did you make sure the program avg is in this directory?"
echo "Did you check the iteration value 'thru'?"
echo "DID YOU MAKE SURE AVG IS COMPILED ON THIS MACHINE?"
echo "DID YOU MAKE SURE ALL TEST PROGRAMS ARE COMPILED ON THIS MACHINE?"

#!/bin/sh
thru=15;
thru2=15;

`rm -rf splitw8_results`
`mkdir splitw8_results`

######## SPLIT RESULTS SECTION ########
enum=32;
dir=splitw8_results;
`echo "mult splitw8 w: $enum" > $dir/avg_mult`
`echo "" >> $dir/avg_mult`
`echo "div splitw8 w: $enum" > $dir/avg_div`
`echo "" >> $dir/avg_div`

echo "Beginning test on splitw8"

while [ $enum -le 32 ]; do

enum2=1;
while [ $enum2 -le $thru ]; do
  `./gf_basic_tester $enum splitw8 100 >> $dir/tmp_results_splitw8_w$enum`
  enum2=`echo $enum2 | awk '{printf $1+1}'`
done

  `cat $dir/tmp_results_splitw8_w$enum | grep "Mega Multiplies" | awk '{printf $4 "\n"}' > $dir/results_splitw8_multiply_w$enum`
  `cat $dir/tmp_results_splitw8_w$enum | grep "Mega Divides" | awk '{printf $4 "\n"}' > $dir/results_splitw8_divide_w$enum`
  `rm $dir/tmp_results_splitw8_w$enum`

`cat $dir/results_splitw8_multiply_w$enum | ./avg >> $dir/avg_mult`
`cat $dir/results_splitw8_divide_w$enum | ./avg >> $dir/avg_div`

enum=`echo $enum | awk '{printf $1+1}'`
done
`rm $dir/results_*`
echo "Finished test on splitw8"

